package com.wjd.chapter03

/**
 *
 * @ProjectName:    EasyKotlinBook
 * @Package:        com.wjd.chapter03
 * @ClassName:      VariableVSValue
 * @Description:     java类作用描述
 * @Author:         王建达
 * @CreateDate:     2018/8/23 23:41
 * @UpdateUser:     更新者
 * @UpdateDate:     2018/8/23 23:41
 * @UpdateRemark:   更新说明
 * @Version:        1.0
 */
class VariableVSValue {
    fun declareVar() {
        var a = 1
        a = 2
        println(a)
        println(a::class)
        println(a::class.java)
        var x = 5
        x += 1
        println("x= $x")
    }

    fun delareVal() {
        val b = "a"
        //b="b"
        println(b)
        println(b::class)
        println(b::class.java)

        val c: Int = 1
        val d = 2
        val e: Int
        e = 3
        println("c= $c ,d= $d ,e= $e")

    }
}